#include"Account.h"
#include"SavingsAccount.h"
SavingsAccount::SavingsAccount(double b,double i) : Account(balance){
    balance=b;
    interestrate=i;
}
double SavingsAccount::CalculateInterest(double i){
    interestrate=i;
    Account::credit(interestrate);
    return balance*interestrate;
}